package cn.project.lemontree.dao;

import cn.project.lemontree.bean.Child;
import cn.project.lemontree.bean.Parent;
import cn.project.lemontree.bean.ParentChild;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ParentChildDao extends BaseMapper<ParentChild> {
    List<ParentChild> listPage(@Param("page") int page,@Param("size") int size,@Param("childName") String childName,@Param("parentName") String parentName);
    int count(@Param("childName") String childName,@Param("parentName") String parentName);
    int remove(@Param("childId") Integer childId,@Param("parentId") Integer parentId);
    List<Parent> findAllByChild(@Param("childId") Integer childId,@Param("childName") String childName);
    List<Child> findAllByParent(@Param("parentId") Integer parentId,@Param("parentName") String parentName);
    int save(Parent parent,Child child);

}
